package com.bianguo.android.apushdemo.retrofit;


import com.bianguo.android.apushdemo.entity.AuditEntity;
import com.bianguo.android.apushdemo.entity.MovieEntity;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by Administrator on 2017/4/21.
 */

public interface ApiService {

    String getListGrid = "ListGridService/getListGrid";
    String post1 = "CommonService/post1";

    @GET("top250")
    Observable<MovieEntity> getTopMovie();

    @GET("")
    Observable<String> login();

//    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @POST(post1)
    Observable<ResponseBody> test(@Body RequestBody body);

    @GET("geocoder")
    Observable<ResponseBody> location(@Query("address") String address, @Query("output") String output, @Query("key") String key);

    @GET("{url}")
    Observable<ResponseBody> location(@Path("url") String url);
}
